import type { IResult } from "@/types/common";
import { commonAxiosJson } from "@/utils/request.js";
/* 红包商城 商品规格信息 地址 */
const url = "/back/mall-sku";
/* 红包商城数据：新增，商品规格名称信息 */
export const commonMallSKUInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/add-spec", params, "POST");
};
/* 红包商城数据：新增规格值信息 */
export const postSpecValueInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/add-spec-value", params, "POST");
};
/* 红包商城数据：规格值排序信息 */
export const putSpecValueSortInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/change-spec-value-sort", params, "PUT");
};
